<template>
	<div class="content">
		<div class="warp-box">
			<div class="top-title">
				<span>{{info.name}}</span>
				<img src="../../../../../assets/images/car_luckdraw/top_title.png" />

			</div>
			<div class="main">
				<!-- <el-carousel :interval="5000" :autoplay="false" arrow="always" indicator-position="none" height="46rem">
					<el-carousel-item v-for="item in 4" :key="item">
						</el-carousel-item>
						</el-carousel> -->
				<div class="small">
					<div class="row-item" v-for="(item ,index) in dataList" :key="index">
						<div class="row-box">
							<div class="prize">
								{{item.sort}}等奖
							</div>
							<div class="prize-box">
								<div class="prize_img">
									<img :src="item.image" />
									<img src="../../../../../assets/images/car_luckdraw/down2x.png"
										style="width: 28px; height: 22px; margin-top: 2px;" />
								</div>
								<div class="item-name">
									{{item.name}}
								</div>
							</div>
							<div class="prize_no">
								<ul>
									<li v-for="(items, k) in item.codes" :key="k">{{items}}</li>
								</ul>
							</div>
						</div>
						<img src="../../../../../assets/images/car_luckdraw/box-s.png" />
					</div>

				</div>

			</div>
		</div>
	</div>
</template>

<script>
	export default {

		data() {
			// 这里存放数据
			return {
				activity_id: '', //活动id
				dataList: [],
				info: {},
			}
		},
		mounted() {
			let activity_id = this.$route.query.id;
			this.activity_id = activity_id;
			this.luckdrawResult(activity_id)
		},

		methods: {
			goSkip() {
				this.$router.push('/rollingDiscResult')
			},
			luckdrawResult(id) {
				let params = {
					activity_no: id
				}
				this.$http.post('/api/root/activity/luckdraw/record', params).then(res => {
					if (res.code == 1) {
						let data = res.data;
						this.info = data;
						this.dataList = data.goods;
					} else {
						//this.dataList = [];
					}
				})
			},
		},
		// 监控data中的数据变化
		watch: {},


	}
</script>

<style scoped lang="less">
	@import 'index.less';
</style>
